package com.example.xinyun.db;

import java.util.Arrays;

public class User {
    private String user;

    private String phones;

    private String password;

    private byte[] userImage;

    public User() {
    }
    public User(String user)
    {
        this.user=user;
    }
    public User(String user,String phones, String password,byte[] userImage) {
        this.user = user;
        this.phones=phones;
        this.password = password;
        this.userImage = userImage;
    }

    public User(String user, String password,byte[] userImage) {
        this.user = user;
        this.password = password;
        this.userImage = userImage;
    }



    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPhones(){return phones;}
    public void setPhones(String phones){this.phones=phones;}

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public byte[] getUserImage() {
        return userImage;
    }

    public void setUserImage(byte[] userImage) {
        this.userImage = userImage;
    }


    public String adduser() {
        return "{" +
                "\"user\":\"" + user + '\"' +
                ", \"password\":\"" + password + '\"' +
                ", \"phones\":\"" + phones + '\"' +
                ", \"userImage\":"+ Arrays.toString(userImage)+
                '}';
    }
    public String updataImage(){
        return "{"+
                "\"user\":\"" + user + '\"' +
                ", \"userImage\":"+ Arrays.toString(userImage)+
                '}';
    }
    public String updataPassWord(){
        return "{"+
                "\"user\":\"" + user + '\"' +
                ", \"password\":\""+ password+"\""+
                '}';
    }
    public String selectuser(){
        return "{" +
                "\"user\":\"" + user + '\"'+
                '}';
    }

}
